package com.tqjc.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Getter
public enum OnlinePathEnum {
    onlinePath1(StockEnum.stockA,RollerEnum.rollerA,"1"),
    onlinePath2(StockEnum.stockA,RollerEnum.rollerB,"2"),
    onlinePath3(StockEnum.stockB,RollerEnum.rollerA,"3"),
    onlinePath4(StockEnum.stockB,RollerEnum.rollerB,"4");
    private StockEnum stock;
    private RollerEnum roller;

    private String path;



    public static OnlinePathEnum getEnumByPath(String path){

        for (OnlinePathEnum value : OnlinePathEnum.values()) {
            if(value.path.equals(path)){
                return value;
            }
        }

        return null;
    }
}
